﻿package com.mini.framework.bi.bpull.chart;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.mini.framework.bi.bpull.model.Line;
import com.mini.framework.bi.bpull.model.LineOne;

/**
 * 曲线图报表对象.
 * 
 * @author lishsh.
 *
 */
public class LineChart {
	
	private String errno;
	
	private String errorMsg;
	
	private String unit;
	
	private List<Line> datas;
	
	private List<LineOne> dataOnes;

	public String getErrno() {
		return errno;
	}

	public void setErrno(String errno) {
		this.errno = errno;
	}

	public String getErrorMsg() {
		return errorMsg;
	}

	public void setErrorMsg(String errorMsg) {
		this.errorMsg = errorMsg;
	}

	public String getUnit() {
		return unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}

	public List<Line> getDatas() {
		return datas;
	}

	public void setDatas(List<Line> datas) {
		this.datas = datas;
	}
	
	
	
	public List<LineOne> getDataOnes() {
		return dataOnes;
	}

	public void setDataOnes(List<LineOne> dataOnes) {
		this.dataOnes = dataOnes;
	}

	public Map<String,Object> getJson(){
		Map<String,Object> json = new HashMap<String,Object>();
		json.put("errno", this.getErrno());
		json.put("errorMsg", this.getErrorMsg());
		json.put("unit", this.getUnit());
		if(this.getDatas() != null){
			json.put("data", this.getDatas());
		}else{
			json.put("data", this.getDataOnes() );
		}
		
		return json;
	}
	
	

}
